package com.kk.base.bean;

import lombok.Data;

/**
 * 错误码统一处理类，所有的错误码统一定义在这里
 *
 * @author Administrator
 */
@Data
public class CodeMsg {

    /**
     * 错误码
     */
    private int code;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 构造函数私有化即单例模式
     */
    private CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    //通用错误码定义
    //处理成功消息码
    public static CodeMsg SUCCESS = new CodeMsg(0, "success");
    //非法数据错误码
    public static CodeMsg DATA_ERROR = new CodeMsg(-1, "非法数据！");
    public static CodeMsg CPACHA_EMPTY = new CodeMsg(-2, "验证码不能为空！");
    public static CodeMsg VALIDATE_ENTITY_ERROR = new CodeMsg(-3, "");
    public static CodeMsg SESSION_EXPIRED = new CodeMsg(-4, "会话已失效，请刷新页面重试！");
    public static CodeMsg CPACHA_ERROR = new CodeMsg(-5, "验证码错误！");
    public static CodeMsg USER_SESSION_EXPIRED = new CodeMsg(-6, "还未登录或会话失效，请重新登录！");
    public static CodeMsg UPLOAD_PHOTO_SUFFIX_ERROR = new CodeMsg(-7, "图片格式不正确！");
    public static CodeMsg UPLOAD_PHOTO_ERROR = new CodeMsg(-8, "图片上传错误！");
    public static CodeMsg ORDER_SN_ERROR = new CodeMsg(-12, "订单编号错误！");
    public static CodeMsg PHONE_ERROR = new CodeMsg(-13, "手机号错误！");
    public static CodeMsg ORDER_AUTH_ERROR = new CodeMsg(-14, "\u8ba2\u5355\u9a8c\u8bc1\u5931\u8d25\uff0c\u8ba2\u5355\u7f16\u53f7\u6216\u624b\u673a\u53f7\u8f93\u5165\u6709\u8bef\u6216\u8005\u53ef\u80fd\u4f60\u8d2d\u4e70\u7684\u662f\u76d7\u7248\uff0c\u8bf7\u8054\u7cfb\u3010\u733f\u6765\u5165\u6b64\u3011\u5ba2\u670d\uff01");

    //后台管理类错误码
    //用户管理类错误
    public static CodeMsg ADMIN_USERNAME_EMPTY = new CodeMsg(-2000, "用户名不能为空！");
    public static CodeMsg ADMIN_PASSWORD_EMPTY = new CodeMsg(-2001, "密码不能为空！");
    public static CodeMsg ADMIN_NO_RIGHT = new CodeMsg(-2002, "您所属的角色没有该权限！");

    //登录类错误码
    public static CodeMsg ADMIN_USERNAME_NO_EXIST = new CodeMsg(-3000, "该用户名不存在！");
    public static CodeMsg ADMIN_PASSWORD_ERROR = new CodeMsg(-3001, "密码错误！");
    public static CodeMsg ADMIN_USER_UNABLE = new CodeMsg(-3002, "该用户已被冻结，请联系管理员！");
    public static CodeMsg ADMIN_USER_ROLE_UNABLE = new CodeMsg(-3003, "该用户所属角色状态不可用，请联系管理员！");
    public static CodeMsg ADMIN_USER_ROLE_AUTHORITES_EMPTY = new CodeMsg(-3004, "该用户所属角色无可用权限，请联系管理员！");

    //后台菜单管理类错误码
    public static CodeMsg ADMIN_MENU_ADD_ERROR = new CodeMsg(-4000, "菜单添加失败，请联系管理员！");
    public static CodeMsg ADMIN_MENU_EDIT_ERROR = new CodeMsg(-4001, "菜单编辑失败，请联系管理员！");
    public static CodeMsg ADMIN_MENU_ID_EMPTY = new CodeMsg(-4002, "菜单ID不能为空！");
    public static CodeMsg ADMIN_MENU_ID_ERROR = new CodeMsg(-4003, "菜单ID错误！");
    public static CodeMsg ADMIN_MENU_DELETE_ERROR = new CodeMsg(-4004, "改菜单下有子菜单，不允许删除！");
    //后台角色管理类错误码
    public static CodeMsg ADMIN_ROLE_ADD_ERROR = new CodeMsg(-5000, "角色添加失败，请联系管理员！");
    public static CodeMsg ADMIN_ROLE_NO_EXIST = new CodeMsg(-5001, "该角色不存在！");
    public static CodeMsg ADMIN_ROLE_EDIT_ERROR = new CodeMsg(-5002, "角色编辑失败，请联系管理员！");
    public static CodeMsg ADMIN_ROLE_DELETE_ERROR = new CodeMsg(-5003, "该角色下存在用户信息，不可删除！");
    public static CodeMsg ADMIN_ROLE_EXIST = new CodeMsg(-5003, "该角色类型下只能有一个角色！");
    //后台用户管理类错误码
    public static CodeMsg ADMIN_USER_ROLE_EMPTY = new CodeMsg(-6000, "请选择用户所属角色！");
    public static CodeMsg ADMIN_USERNAME_EXIST = new CodeMsg(-6001, "该用户名已存在，请换一个试试！");
    public static CodeMsg ADMIN_USE_ADD_ERROR = new CodeMsg(-6002, "用户添加失败，请联系管理员！");
    public static CodeMsg ADMIN_USE_NO_EXIST = new CodeMsg(-6003, "用户不存在！");
    public static CodeMsg ADMIN_USE_EDIT_ERROR = new CodeMsg(-6004, "用户编辑失败，请联系管理员！");
    public static CodeMsg ADMIN_USE_DELETE_ERROR = new CodeMsg(-6005, "该用户存在关联数据，不允许删除！");

    //后台用户修改密码类错误码
    public static CodeMsg ADMIN_USER_UPDATE_PWD_ERROR = new CodeMsg(-7000, "旧密码错误！");
    public static CodeMsg ADMIN_USER_UPDATE_PWD_EMPTY = new CodeMsg(-7001, "新密码不能为空！");

    //后台用户修改密码类错误码
    public static CodeMsg ADMIN_DATABASE_BACKUP_NO_EXIST = new CodeMsg(-8000, "备份记录不存在！");

    //快递管理类错误码
    public static CodeMsg ADMIN_EXPRESSMAILORDER_ADD_ERROR = new CodeMsg(-60001, "快递订单添加失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_RECEIVING_EDIT_ERROR = new CodeMsg(-60004, "快递订单揽收失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_SENDTHECARGO_ADD_EDIT_ERROR = new CodeMsg(-60004, "快递订单发货失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER1_RECEIVING_EDIT_ERROR = new CodeMsg(-60003, "快递订单收货失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER1_BUYOFF_EDIT_ERROR = new CodeMsg(-60003, "指定派送快递员失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_USER_NULL = new CodeMsg(-60004, "请选择网点|派送点");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_ID_NULL = new CodeMsg(-60004, "订单不能为空");
    public static CodeMsg ADMIN_EXPRESSMAILORDER1_BUYOFF1_EDIT_ERROR = new CodeMsg(-60003, "快点签收失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_ISMOBILE_EDIT_ERROR = new CodeMsg(-6004, "手机号格式不对,请重新输入！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_ISADDRESS_EDIT_ERROR = new CodeMsg(-6004, "请填写地址!");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_ISADDRESSLENGTH_EDIT_ERROR = new CodeMsg(-6004, "地址长度不能超过50!");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_DELETE_ERROR = new CodeMsg(-6005, "该订单存在关联数据，不允许删除！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_SETPICKUPTIME_ERROR = new CodeMsg(-60001, "快递订单设置上门送件时间失败，请联系管理员！");
    public static CodeMsg ADMIN_EXPRESSMAILORDER_SETPICKUPTIME_ERROR1 = new CodeMsg(-60001, "快递订单已签收,无法设置上门送件时间！");


    //前台登录错误码
    public static CodeMsg HOMEUSER_MOBILE_ERROR = new CodeMsg(-20000, "手机号格式错误！");
    public static CodeMsg HOMEUSER_CODE_ERROR = new CodeMsg(-20001, "验证码不能为空！");
    public static CodeMsg HOMEUSER_CODE_LENGTH_ERROR = new CodeMsg(-20002, "验证码长度错误！");
    public static CodeMsg HOMEUSER_MOBILE_EXIST = new CodeMsg(-20003, "该手机号已存在！");
    public static CodeMsg HOMEUSER_ADD_ERROR = new CodeMsg(-20004, "注册失败！请稍后重试");
    public static CodeMsg HOMEUSER_NO_EXIST = new CodeMsg(-20007, "登录手机号不存在！");
    public static CodeMsg HOMEUSER_PASSWORD_ERROR = new CodeMsg(-20008, "密码错误！");
    public static CodeMsg COMMON_EMAIL_FORMAET_ERROR = new CodeMsg(-20014, "邮箱格式不正确！");
    public static CodeMsg CODE_NOT_EMPTY = new CodeMsg(-20015, "验证码为空，请发送验证码后重试！");
    public static CodeMsg CODE_NOT_ERROR = new CodeMsg(-20016, "邮箱错误！");
    public static CodeMsg HOMEUSER_FORGET_ERROR = new CodeMsg(-20017, "修改失败！");
    public static CodeMsg HOMEUSER_STATUS_ERROR = new CodeMsg(-20018, "您的账号已被冻结！");
    public static CodeMsg HOMEUSER_USER_EDIT_ERROR = new CodeMsg(-20019, "前台用户编辑失败");

    //前台网点申请错误码
    public static CodeMsg BRANCHAPPLYFOR_ERROR = new CodeMsg(-21001, "网点申请提交失败！请稍后再试");
    public static CodeMsg BRANCHAPPLYFOR_STATUS_ERROR = new CodeMsg(-21002, "您的申请已通过，不可删除");
    public static CodeMsg BRANCHAPPLYFOR_STATUSNOT_ERROR = new CodeMsg(-21002, "您的申请待验证，不可删除");
    public static CodeMsg BRANCHAPPLYFOR_DELETE_ERROR = new CodeMsg(-21004, "该网点申请存在关联数据，不允许删除！");
    public static CodeMsg BRANCHAPPLYFOR_EXIST = new CodeMsg(-21005, "您的申请已提交！请等待审核后再试");

    //前台用户错误码
    public static CodeMsg HOMEUSER_EDIT_ERROR = new CodeMsg(-22000, "信息修改失败！");
    public static CodeMsg HOMEUSERADDRESS_ADD_ERROR = new CodeMsg(-22001, "地址添加失败！");
    public static CodeMsg HOMEUSERADDRESS_MOBILE_PHONE_ERROR = new CodeMsg(-22002, "手机号或座机号必须填写一个");
    public static CodeMsg HOMEUSERADDRESS_DELETE_ERROR = new CodeMsg(-22003, "地址删除失败，请稍后再试");
    public static CodeMsg HOMEUSERADDRESS_DEFAULT_ERROR = new CodeMsg(-22004, "默认地址设置失败，请稍后再试");
    public static CodeMsg HOMEUSERIDCARD_ERROR = new CodeMsg(-22005, "实名认证失败");
    public static CodeMsg HOMEUSERIDCARD_EXIST = new CodeMsg(-22006, "您已实名认证，无需再次认证");


    //后台网点管理类错误码
    public static CodeMsg BRANCHES_USER_ROLE_EMPTY = new CodeMsg(-27000, "请选择网点所属角色！");
    public static CodeMsg BRANCHES_USERNAME_EXIST = new CodeMsg(-27001, "该网点名已存在，请换一个试试！");
    public static CodeMsg BRANCHES_USE_NO_EXIST = new CodeMsg(-27003, "网点不存在！");
    public static CodeMsg BRANCHES_USE_EDIT_ERROR = new CodeMsg(-27004, "网点编辑失败，请联系管理员！");


    //后台运输点管理类错误码
    public static CodeMsg TRANSPORT_USER_ROLE_EMPTY = new CodeMsg(-28000, "请选择运输点所属角色！");
    public static CodeMsg TRANSPORT_USERNAME_EXIST = new CodeMsg(-28001, "该用户名已存在，请换一个试试！");
    public static CodeMsg TRANSPORT_USE_ADD_ERROR = new CodeMsg(-28002, "运输点添加失败，请联系管理员！");
    public static CodeMsg TRANSPORT_USE_NO_EXIST = new CodeMsg(-28003, "运输点不存在！");
    public static CodeMsg TRANSPORT_USE_EDIT_ERROR = new CodeMsg(-28004, "运输点编辑失败，请联系管理员！");
    public static CodeMsg TRANSPORT_USE_DELETE_ERROR = new CodeMsg(-28005, "该运输点存在关联数据，不允许删除！");
    public static CodeMsg ADDRESS_ERROR = new CodeMsg(-28006, "请选择省市区！");

    //后台快递员管理类错误码
    public static CodeMsg COURIER_USER_ROLE_EMPTY = new CodeMsg(-29000, "请选择快递员所属角色！");
    public static CodeMsg COURIER_USERNAME_EXIST = new CodeMsg(-29001, "该用户名已存在，请换一个试试！");
    public static CodeMsg COURIER_USE_ADD_ERROR = new CodeMsg(-29002, "快递员添加失败，请联系管理员！");
    public static CodeMsg COURIER_USE_NO_EXIST = new CodeMsg(-29003, "快递员不存在！");
    public static CodeMsg COURIER_USE_EDIT_ERROR = new CodeMsg(-29004, "快递员编辑失败，请联系管理员！");
    public static CodeMsg COURIER_USE_DELETE_ERROR = new CodeMsg(-29005, "该快递员存在关联数据，不允许删除！");
    public static CodeMsg COURIER_USER_ROLE_ERROR = new CodeMsg(-29005, "您的身份不是网点，无法添加快递员！");

    //网点申请管理错误码
    public static CodeMsg BRANCHAPPLYFOR_THROUGH_ERROR = new CodeMsg(-29100, "通过申请失败");
    public static CodeMsg BRANCHAPPLYFOR_NOTTHROUGH_ERROR = new CodeMsg(-29101, "驳回申请失败");
    public static CodeMsg BRANCHAPPLYFOR_NOTTHROUGH_NULL = new CodeMsg(-29101, "驳回原因不能为空");
    public static CodeMsg BRANCHAPPLYFOR_NOTTHROUGH_LENGTH = new CodeMsg(-29101, "驳回原因不能超过188字");
    public static CodeMsg BRANCHAPPLYFOR_ROLE_NO_EXIST = new CodeMsg(-29102, "该网点角色为空！请先添加网点角色");

    //报价时效管理错误码
    public static CodeMsg ADMIN_AGINGQUERY_ADD_ERROR = new CodeMsg(-88001, "报价时效添加失败，请联系管理员！");
    public static CodeMsg ADMIN_AGINGQUERY_ISEXIST = new CodeMsg(-88002, "该来往地点已存在，请换一个试试！");
    public static CodeMsg ADMIN_AGINGQUERY_DELETE_ERROR = new CodeMsg(-6005, "该报价时效存在关联数据，不允许删除！");
    public static CodeMsg ADMIN_AGINGQUERY_SEL_ERROR = new CodeMsg(-6005, "暂无该来往地的报价时效");


    //后台网点管理类错误码
    public static CodeMsg COMPLAINT_WAYBILLNUMBER_EXIST = new CodeMsg(-40001, "该订单你已投诉过，不可重复投诉！");
    public static CodeMsg WAYBILLNUMBER_NO_EXIST = new CodeMsg(-40002, "该订单不存在！");
    public static CodeMsg COMPLAINT_ERROR = new CodeMsg(-40003, "投诉失败！");
    public static CodeMsg COMPLAINT_ACCEPTED_ERROR = new CodeMsg(-40004, "投诉受理失败！");
}
